/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.restaurant.domain;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author root
 */
@Entity
@Table(name = "tableshape")
@XmlRootElement(name = "tableshape")
@NamedQueries({
    @NamedQuery(name = "Tableshape.findAll", query = "SELECT t FROM Tableshape t"),
    @NamedQuery(name = "Tableshape.findByTableShapeID", query = "SELECT t FROM Tableshape t WHERE t.tableShapeID = :tableShapeID"),
    @NamedQuery(name = "Tableshape.findByShapename", query = "SELECT t FROM Tableshape t WHERE t.shapename = :shapename")})
public class Tableshape implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "TableShapeID")
    private Long tableShapeID;
    @Column(name = "shapename")
    private String shapename;
    
    public Tableshape() {
    }

    public Tableshape(Long tableShapeID) {
        this.tableShapeID = tableShapeID;
    }

    public Long getTableShapeID() {
        return tableShapeID;
    }

    public void setTableShapeID(Long tableShapeID) {
        this.tableShapeID = tableShapeID;
    }

    public String getShapename() {
        return shapename;
    }

    public void setShapename(String shapename) {
        this.shapename = shapename;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (tableShapeID != null ? tableShapeID.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Tableshape)) {
            return false;
        }
        Tableshape other = (Tableshape) object;
        if ((this.tableShapeID == null && other.tableShapeID != null) || (this.tableShapeID != null && !this.tableShapeID.equals(other.tableShapeID))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.restaurant.domain.Tableshape[tableShapeID=" + tableShapeID + "]";
    }

}
